package com.sucsoft.pdf.bean.mongodb;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author zhaowh
 * @Date 2020/10/19
 * Description
 */
@ApiModel("书籍的目录信息")
@Document(collection = "catalog_info")
public class CatalogInfo {

    @ApiModelProperty("书籍id")
    private String id;

    @ApiModelProperty("书籍Id")
    @Field("book_id")
    private String bookId;

    @Field("book_name")
    @ApiModelProperty("书籍名称")
    private String bookName;

    @ApiModelProperty("总页数")
    @Field("total_page")
    private Integer totalPage;

    @ApiModelProperty("目录信息")
    @Field("catalog_info")
    private List<ChildCatalog> childCatalogList = new ArrayList<>();


    public String getId() {
        return id;
    }

    public CatalogInfo setId(String id) {
        this.id = id;
        return this;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public List<ChildCatalog> getChildCatalogList() {
        return childCatalogList;
    }

    public void setChildCatalogList(List<ChildCatalog> childCatalogList) {
        this.childCatalogList = childCatalogList;
    }
}
